<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 7.编写一个函数，用于提取出URL网址中的文件名部分，并将提取的文件名返回。如：  https://www.baidu.com/img/logo.png?v=2.5 返回logo.png。（考点：字符串方法）
        let q = "https://www.baidu.com/img/logo.png?v=2.5"
        let a = q.split("/")
        console.log(a);
        let w = a.slice(a.length - 1, a.length)
        console.log(w);
        let y = w.toString()
        console.log(y);
        let u = y.split("?").shift()
        console.log(u);





    </script>
</body>

</html>